﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_CapNhatSoDuDauKyHangHoaTheoLo : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("CboHangSanXuat")]
        private ComboBox _CboHangSanXuat;
        [AccessedThroughProperty("CboKho")]
        private ComboBox _CboKho;
        [AccessedThroughProperty("CboNhom")]
        private ComboBox _CboNhom;
        [AccessedThroughProperty("CboQuocGia")]
        private ComboBox _CboQuocGia;
        [AccessedThroughProperty("CmdAddRowHH")]
        private Button _CmdAddRowHH;
        [AccessedThroughProperty("CmdDelRowHH")]
        private Button _CmdDelRowHH;
        [AccessedThroughProperty("CmdExit")]
        private C1Button _CmdExit;
        [AccessedThroughProperty("Label18")]
        private Label _Label18;
        [AccessedThroughProperty("Label25")]
        private Label _Label25;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Panel3")]
        private Panel _Panel3;
        [AccessedThroughProperty("Panel5")]
        private Panel _Panel5;
        [AccessedThroughProperty("Panel7")]
        private Panel _Panel7;
        [AccessedThroughProperty("TxtSoTien")]
        private C1NumericEdit _TxtSoTien;
        [AccessedThroughProperty("TxtTimMa")]
        private TextBox _TxtTimMa;
        [AccessedThroughProperty("TxtTimTen")]
        private TextBox _TxtTimTen;
        [AccessedThroughProperty("VSHangHoa")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSHangHoa;
        public bool bLoaded;
        private DataView cFrmData;
        private string cFrmFormat;
        public string cFrmKhoa;
        private string cFrmNamThang;
        private IContainer components;
        private bool IsLoaded;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private clsSoDuDauKyHangHoa objSDDKHH;

        public Frm_CapNhatSoDuDauKyHangHoaTheoLo()
        {
            base.Load += new EventHandler(this.Frm_CapNhatSoDuDauKyHangHoaTheoLo_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objSDDKHH = new clsSoDuDauKyHangHoa();
            this.cFrmKhoa = "";
            this.cFrmNamThang = "";
            this.bLoaded = false;
            this.IsLoaded = false;
            this.InitializeComponent();
        }

        private void CboKho_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.LoadSoDuKho();
        }

        private void CmdAddRowHH_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_CapNhatSoDuHangHoa.cFrmNamThang = this.cFrmNamThang;
            MyProject.Forms.Frm_CapNhatSoDuHangHoa.cFrmKhoa = "";
            MyProject.Forms.Frm_CapNhatSoDuHangHoa.KhoaKho = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKho.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim();
            MyProject.Forms.Frm_CapNhatSoDuHangHoa.ShowDialog();
            this.LoadSoDuKho();
        }

        private void CmdDelRowHH_Click(object sender, EventArgs e)
        {
            if (((this.VSHangHoa.Rows.Count != 1) && (this.VSHangHoa.Row > 0)) && (LVYModule.ConfirmDelete(modGeneral.Tranlated("Bạn thật sự muốn x\x00f3a d\x00f2ng dữ liệu n\x00e0y?", "")) && this.objSDDKHH.DelData(Conversions.ToString(this.VSHangHoa[this.VSHangHoa.Row, 0]))))
            {
                this.VSHangHoa.RemoveItem(this.VSHangHoa.Row);
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void FilterData(string field, string str)
        {
            string str2 = field + " LIKE '%" + str + "%'";
            this.cFrmData.RowFilter = str2;
            if (this.VSHangHoa.Rows.Count != 1)
            {
                this.VSHangHoa.Select(1, 0, 1, this.VSHangHoa.Cols.Count - 1);
            }
            C1.Win.C1FlexGrid.C1FlexGrid vSHangHoa = this.VSHangHoa;
            vSHangHoa.Cols[4].Width = 90;
            vSHangHoa.Cols[5].Width = 200;
            vSHangHoa.Cols[6].Width = 80;
            vSHangHoa.Cols[11].Width = 50;
            vSHangHoa.Cols[12].Width = 50;
            vSHangHoa.Cols[13].Width = 70;
            vSHangHoa.Cols[14].Width = 70;
            vSHangHoa.Cols[15].Width = 80;
            vSHangHoa = null;
        }

        private void Frm_CapNhatSoDuDauKyHangHoaTheoLo_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.cFrmNamThang = LVYModule.sLeft(modGeneral.H_FIRSTDAY, 6);
                if (this.cFrmNamThang.Trim() == "")
                {
                    this.cFrmNamThang = SearchModule.GetNamThang("");
                }
                if (this.cFrmNamThang.Trim() == "")
                {
                    this.Dispose();
                }
                else
                {
                    C1.Win.C1FlexGrid.C1FlexGrid vSHangHoa = this.VSHangHoa;
                    vSHangHoa.Cols[6].Visible = modGeneral.H_THEODOISERI;
                    vSHangHoa.Cols[7].Visible = modGeneral.H_THEODOISOLOHANG;
                    vSHangHoa.Cols[9].Visible = modGeneral.H_THEODOIHANDUNG;
                    vSHangHoa = null;
                    this.CmdAddRowHH.Enabled = this.mAllowAdd;
                    this.CmdDelRowHH.Enabled = this.mAllowDel;
                    this.IsLoaded = false;
                    this.cFrmFormat = modGeneral.H_FORMATNUMBER;
                    BuildComboModule.BuildCombo(this.CboNhom, modGeneral.ListDanhMuc.NhomHangHoa, true, "", "");
                    BuildComboModule.BuildCombo(this.CboQuocGia, modGeneral.ListDanhMuc.QuocGia, true, "", "");
                    BuildComboModule.BuildCombo(this.CboHangSanXuat, modGeneral.ListDanhMuc.HangSanXuat, true, "", "");
                    BuildComboModule.BuildCombo(this.CboKho, modGeneral.ListDanhMuc.KhoHang, false, "", "");
                    this.IsLoaded = true;
                    this.LoadSoDuKho();
                }
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_CapNhatSoDuDauKyHangHoaTheoLo));
            this.Panel7 = new Panel();
            this.CmdExit = new C1Button();
            this.Label6 = new Label();
            this.CboKho = new ComboBox();
            this.Label25 = new Label();
            this.CboHangSanXuat = new ComboBox();
            this.Label3 = new Label();
            this.CboQuocGia = new ComboBox();
            this.Label18 = new Label();
            this.CboNhom = new ComboBox();
            this.VSHangHoa = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Panel3 = new Panel();
            this.TxtTimTen = new TextBox();
            this.TxtTimMa = new TextBox();
            this.CmdDelRowHH = new Button();
            this.CmdAddRowHH = new Button();
            this.Panel5 = new Panel();
            this.TxtSoTien = new C1NumericEdit();
            this.Label5 = new Label();
            this.Panel7.SuspendLayout();
            this.VSHangHoa.BeginInit();
            this.Panel3.SuspendLayout();
            this.Panel5.SuspendLayout();
            ((ISupportInitialize) this.TxtSoTien).BeginInit();
            this.SuspendLayout();
            this.Panel7.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel7.Controls.Add(this.CmdExit);
            this.Panel7.Controls.Add(this.Label6);
            this.Panel7.Controls.Add(this.CboKho);
            this.Panel7.Controls.Add(this.Label25);
            this.Panel7.Controls.Add(this.CboHangSanXuat);
            this.Panel7.Controls.Add(this.Label3);
            this.Panel7.Controls.Add(this.CboQuocGia);
            this.Panel7.Controls.Add(this.Label18);
            this.Panel7.Controls.Add(this.CboNhom);
            this.Panel7.Dock = DockStyle.Top;
            Point point = new Point(0, 0);
            this.Panel7.Location = point;
            this.Panel7.Name = "Panel7";
            Size size = new Size(0x37c, 0x2b);
            this.Panel7.Size = size;
            this.Panel7.TabIndex = 0x1b;
            point = new Point(0x31c, 15);
            this.CmdExit.Location = point;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x54, 0x18);
            this.CmdExit.Size = size;
            this.CmdExit.TabIndex = 0x30;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.CmdExit.UseVisualStyleBackColor = true;
            this.CmdExit.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Black;
            this.CmdExit.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Black;
            this.Label6.AutoSize = true;
            this.Label6.BackColor = Color.Transparent;
            this.Label6.ForeColor = Color.Black;
            point = new Point(1, 3);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x35, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 0x2e;
            this.Label6.Text = "Kho h\x00e0ng";
            this.CboKho.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboKho.FormattingEnabled = true;
            point = new Point(2, 0x12);
            this.CboKho.Location = point;
            this.CboKho.Name = "CboKho";
            size = new Size(0x93, 0x15);
            this.CboKho.Size = size;
            this.CboKho.TabIndex = 0x2d;
            this.Label25.AutoSize = true;
            this.Label25.BackColor = Color.Transparent;
            this.Label25.ForeColor = Color.Black;
            point = new Point(500, 3);
            this.Label25.Location = point;
            this.Label25.Name = "Label25";
            size = new Size(0x4c, 13);
            this.Label25.Size = size;
            this.Label25.TabIndex = 0x2c;
            this.Label25.Text = "H\x00e3ng sản xuất";
            this.CboHangSanXuat.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboHangSanXuat.FormattingEnabled = true;
            point = new Point(0x1f7, 0x12);
            this.CboHangSanXuat.Location = point;
            this.CboHangSanXuat.Name = "CboHangSanXuat";
            size = new Size(0x94, 0x15);
            this.CboHangSanXuat.Size = size;
            this.CboHangSanXuat.TabIndex = 0x2b;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            this.Label3.ForeColor = Color.Black;
            point = new Point(0x156, 3);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x2b, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 40;
            this.Label3.Text = "Xuất sứ";
            this.CboQuocGia.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboQuocGia.FormattingEnabled = true;
            point = new Point(0x159, 0x12);
            this.CboQuocGia.Location = point;
            this.CboQuocGia.Name = "CboQuocGia";
            size = new Size(0x9a, 0x15);
            this.CboQuocGia.Size = size;
            this.CboQuocGia.TabIndex = 0x27;
            this.Label18.AutoSize = true;
            this.Label18.BackColor = Color.Transparent;
            this.Label18.ForeColor = Color.Black;
            point = new Point(0x97, 3);
            this.Label18.Location = point;
            this.Label18.Name = "Label18";
            size = new Size(0x3e, 13);
            this.Label18.Size = size;
            this.Label18.TabIndex = 0x20;
            this.Label18.Text = "Nh\x00f3m h\x00e0ng";
            this.CboNhom.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboNhom.FormattingEnabled = true;
            point = new Point(0x99, 0x12);
            this.CboNhom.Location = point;
            this.CboNhom.Name = "CboNhom";
            size = new Size(0xbd, 0x15);
            this.CboNhom.Size = size;
            this.CboNhom.TabIndex = 0x1f;
            this.VSHangHoa.AllowEditing = false;
            this.VSHangHoa.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.XpThemes;
            this.VSHangHoa.ColumnInfo = manager.GetString("VSHangHoa.ColumnInfo");
            this.VSHangHoa.Cursor = Cursors.Default;
            this.VSHangHoa.Dock = DockStyle.Fill;
            this.VSHangHoa.ExtendLastCol = true;
            this.VSHangHoa.FocusRect = FocusRectEnum.Solid;
            this.VSHangHoa.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 0x2b);
            this.VSHangHoa.Location = point;
            this.VSHangHoa.Name = "VSHangHoa";
            this.VSHangHoa.Rows.Count = 1;
            this.VSHangHoa.Rows.DefaultSize = 0x11;
            size = new Size(0x37c, 0x1e9);
            this.VSHangHoa.Size = size;
            this.VSHangHoa.StyleInfo = manager.GetString("VSHangHoa.StyleInfo");
            this.VSHangHoa.TabIndex = 0x1c;
            this.Panel3.BackgroundImage = (Image) manager.GetObject("Panel3.BackgroundImage");
            this.Panel3.Controls.Add(this.TxtTimTen);
            this.Panel3.Controls.Add(this.TxtTimMa);
            this.Panel3.Controls.Add(this.CmdDelRowHH);
            this.Panel3.Controls.Add(this.CmdAddRowHH);
            this.Panel3.Controls.Add(this.Panel5);
            this.Panel3.Dock = DockStyle.Bottom;
            point = new Point(0, 0x214);
            this.Panel3.Location = point;
            this.Panel3.Name = "Panel3";
            size = new Size(0x37c, 0x23);
            this.Panel3.Size = size;
            this.Panel3.TabIndex = 0x1d;
            point = new Point(0x68, 0x3d);
            this.TxtTimTen.Location = point;
            this.TxtTimTen.Name = "TxtTimTen";
            size = new Size(0x101, 20);
            this.TxtTimTen.Size = size;
            this.TxtTimTen.TabIndex = 15;
            point = new Point(3, 0x3d);
            this.TxtTimMa.Location = point;
            this.TxtTimMa.Name = "TxtTimMa";
            size = new Size(100, 20);
            this.TxtTimMa.Size = size;
            this.TxtTimMa.TabIndex = 14;
            this.CmdDelRowHH.Image = (Image) manager.GetObject("CmdDelRowHH.Image");
            this.CmdDelRowHH.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(100, 6);
            this.CmdDelRowHH.Location = point;
            this.CmdDelRowHH.Name = "CmdDelRowHH";
            size = new Size(0x59, 0x18);
            this.CmdDelRowHH.Size = size;
            this.CmdDelRowHH.TabIndex = 13;
            this.CmdDelRowHH.Text = "&2.X\x00f3a d\x00f2ng";
            this.CmdDelRowHH.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdDelRowHH.UseVisualStyleBackColor = true;
            this.CmdAddRowHH.Image = (Image) manager.GetObject("CmdAddRowHH.Image");
            this.CmdAddRowHH.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(3, 6);
            this.CmdAddRowHH.Location = point;
            this.CmdAddRowHH.Name = "CmdAddRowHH";
            size = new Size(0x5c, 0x18);
            this.CmdAddRowHH.Size = size;
            this.CmdAddRowHH.TabIndex = 12;
            this.CmdAddRowHH.Text = "&1.Th\x00eam d\x00f2ng";
            this.CmdAddRowHH.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdAddRowHH.UseVisualStyleBackColor = true;
            this.Panel5.BackgroundImage = (Image) manager.GetObject("Panel5.BackgroundImage");
            this.Panel5.Controls.Add(this.TxtSoTien);
            this.Panel5.Controls.Add(this.Label5);
            this.Panel5.Dock = DockStyle.Right;
            point = new Point(0x2b3, 0);
            this.Panel5.Location = point;
            this.Panel5.Name = "Panel5";
            size = new Size(0xc9, 0x23);
            this.Panel5.Size = size;
            this.Panel5.TabIndex = 1;
            this.TxtSoTien.BorderStyle = BorderStyle.FixedSingle;
            this.TxtSoTien.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x56, 5);
            this.TxtSoTien.Location = point;
            this.TxtSoTien.Name = "TxtSoTien";
            Padding padding = new Padding(1);
            this.TxtSoTien.Padding = padding;
            this.TxtSoTien.ReadOnly = true;
            size = new Size(0x6d, 20);
            this.TxtSoTien.Size = size;
            this.TxtSoTien.TabIndex = 0x58;
            this.TxtSoTien.Tag = null;
            this.TxtSoTien.TextAlign = HorizontalAlignment.Right;
            this.TxtSoTien.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtSoTien.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtSoTien.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label5.AutoEllipsis = true;
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            this.Label5.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xa3);
            point = new Point(10, 8);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            this.Label5.RightToLeft = RightToLeft.No;
            size = new Size(0x44, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0x4f;
            this.Label5.Text = "Tổng cộng";
            this.Label5.TextAlign = ContentAlignment.TopRight;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x37c, 0x237);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.VSHangHoa);
            this.Controls.Add(this.Panel7);
            this.Controls.Add(this.Panel3);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "Frm_CapNhatSoDuDauKyHangHoaTheoLo";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "ST-0005";
            this.Text = "CAP NHAT SO DU DAU KY HANG HOA";
            this.Panel7.ResumeLayout(false);
            this.Panel7.PerformLayout();
            this.VSHangHoa.EndInit();
            this.Panel3.ResumeLayout(false);
            this.Panel3.PerformLayout();
            this.Panel5.ResumeLayout(false);
            this.Panel5.PerformLayout();
            ((ISupportInitialize) this.TxtSoTien).EndInit();
            this.ResumeLayout(false);
        }

        public void LoadSoDuKho()
        {
            this.VSHangHoa.DataSource = null;
            this.VSHangHoa.Rows.Count = 1;
            if (this.IsLoaded && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKho.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != ""))
            {
                this.Cursor = Cursors.WaitCursor;
                this.cFrmData = new DataView(this.objSDDKHH.GetTonKhoDauKyHangHoa(this.cFrmNamThang, Conversions.ToString(this.CboKho.SelectedValue), 1, LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNhom.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim(), LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboQuocGia.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim(), LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboHangSanXuat.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim()));
                C1.Win.C1FlexGrid.C1FlexGrid vSHangHoa = this.VSHangHoa;
                vSHangHoa.DataSource = this.cFrmData;
                vSHangHoa.Cols[0].Visible = false;
                vSHangHoa.Cols[1].Visible = false;
                vSHangHoa.Cols[2].Visible = false;
                vSHangHoa.Cols[3].Visible = false;
                vSHangHoa.Cols[6].Visible = false;
                vSHangHoa.Cols[8].Visible = false;
                vSHangHoa.Cols[10].Visible = false;
                vSHangHoa.Cols[0x10].Visible = false;
                vSHangHoa.Cols[4].Width = 90;
                vSHangHoa.Cols[5].Width = 200;
                vSHangHoa.Cols[6].Width = 80;
                vSHangHoa.Cols[11].Width = 50;
                vSHangHoa.Cols[12].Width = 50;
                vSHangHoa.Cols[13].Width = 70;
                vSHangHoa.Cols[14].Width = 80;
                vSHangHoa.Cols[15].Width = 80;
                vSHangHoa[0, 4] = modGeneral.Tranlated("M\x00e3 h\x00e0ng", "");
                vSHangHoa[0, 5] = modGeneral.Tranlated("T\x00ean h\x00e0ng", "");
                vSHangHoa[0, 6] = modGeneral.Tranlated("Số seri", "");
                vSHangHoa[0, 7] = modGeneral.Tranlated("Số l\x00f4", "");
                vSHangHoa[0, 9] = modGeneral.Tranlated("Hạn sử dụng", "");
                vSHangHoa[0, 11] = modGeneral.Tranlated("ĐVT", "");
                vSHangHoa[0, 12] = modGeneral.Tranlated("Quy c\x00e1ch", "");
                vSHangHoa[0, 13] = modGeneral.Tranlated("Số lượng", "");
                vSHangHoa[0, 14] = modGeneral.Tranlated("Đơn gi\x00e1", "");
                vSHangHoa[0, 15] = modGeneral.Tranlated("Th\x00e0nh tiền", "");
                vSHangHoa[0, 0x11] = modGeneral.Tranlated("TK. h\x00e0ng h\x00f3a", "");
                vSHangHoa.Cols[13].DataType = System.Type.GetType("Decimal");
                vSHangHoa.Cols[13].Format = modGeneral.H_FORMATNUMBER;
                vSHangHoa.Cols[14].DataType = System.Type.GetType("Decimal");
                vSHangHoa.Cols[14].Format = modGeneral.H_FORMATNUMBER;
                vSHangHoa.Cols[15].DataType = System.Type.GetType("Decimal");
                vSHangHoa.Cols[15].Format = modGeneral.H_FORMATNUMBER;
                vSHangHoa = null;
                this.TxtSoTien.Value = LVYModule.SumColGrid(this.VSHangHoa, 15);
                this.Cursor = Cursors.Default;
            }
        }

        private void TxtTimMa_TextChanged(object sender, EventArgs e)
        {
            this.FilterData("MaHang", this.TxtTimMa.Text.Trim());
        }

        private void TxtTimTen_TextChanged(object sender, EventArgs e)
        {
            this.FilterData("TenHang", this.TxtTimTen.Text.Trim());
        }

        private void VSHangHoa_DoubleClick(object sender, EventArgs e)
        {
            if ((this.VSHangHoa.Rows.Count != 1) && (this.VSHangHoa.Row > 0))
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[this.VSHangHoa.Row, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    MyProject.Forms.Frm_CapNhatSoDuHangHoa.cFrmKhoa = Conversions.ToString(this.VSHangHoa[this.VSHangHoa.Row, 0]);
                    MyProject.Forms.Frm_CapNhatSoDuHangHoa.ShowDialog();
                }
                else
                {
                    MyProject.Forms.Frm_CapNhatSoDuHangHoa.cFrmKhoa = "";
                    MyProject.Forms.Frm_CapNhatSoDuHangHoa.cFrmKhoaHangHoa = Conversions.ToString(this.VSHangHoa[this.VSHangHoa.Row, 3]);
                    MyProject.Forms.Frm_CapNhatSoDuHangHoa.TxtMaHang.Text = this.VSHangHoa[this.VSHangHoa.Row, 4].ToString().Trim();
                    MyProject.Forms.Frm_CapNhatSoDuHangHoa.TxtTenHang.Text = this.VSHangHoa[this.VSHangHoa.Row, 5].ToString().Trim();
                    MyProject.Forms.Frm_CapNhatSoDuHangHoa.CboKho.SelectedValue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKho.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim();
                    MyProject.Forms.Frm_CapNhatSoDuHangHoa.ShowDialog();
                }
                this.LoadSoDuKho();
            }
        }

        internal virtual ComboBox CboHangSanXuat
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboHangSanXuat;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboHangSanXuat = value;
            }
        }

        internal virtual ComboBox CboKho
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboKho;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboKho_SelectedIndexChanged);
                if (this._CboKho != null)
                {
                    this._CboKho.SelectedIndexChanged -= handler;
                }
                this._CboKho = value;
                if (this._CboKho != null)
                {
                    this._CboKho.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboNhom
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboNhom;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboNhom = value;
            }
        }

        internal virtual ComboBox CboQuocGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboQuocGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboQuocGia = value;
            }
        }

        internal virtual Button CmdAddRowHH
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAddRowHH;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAddRowHH_Click);
                if (this._CmdAddRowHH != null)
                {
                    this._CmdAddRowHH.Click -= handler;
                }
                this._CmdAddRowHH = value;
                if (this._CmdAddRowHH != null)
                {
                    this._CmdAddRowHH.Click += handler;
                }
            }
        }

        internal virtual Button CmdDelRowHH
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDelRowHH;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDelRowHH_Click);
                if (this._CmdDelRowHH != null)
                {
                    this._CmdDelRowHH.Click -= handler;
                }
                this._CmdDelRowHH = value;
                if (this._CmdDelRowHH != null)
                {
                    this._CmdDelRowHH.Click += handler;
                }
            }
        }

        internal virtual C1Button CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual Label Label18
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label18;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label18 = value;
            }
        }

        internal virtual Label Label25
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label25;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label25 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Panel Panel3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel3 = value;
            }
        }

        internal virtual Panel Panel5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel5 = value;
            }
        }

        internal virtual Panel Panel7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel7 = value;
            }
        }

        internal virtual C1NumericEdit TxtSoTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoTien = value;
            }
        }

        internal virtual TextBox TxtTimMa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTimMa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTimMa = value;
            }
        }

        internal virtual TextBox TxtTimTen
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTimTen;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTimTen = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSHangHoa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSHangHoa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.VSHangHoa_DoubleClick);
                if (this._VSHangHoa != null)
                {
                    this._VSHangHoa.DoubleClick -= handler;
                }
                this._VSHangHoa = value;
                if (this._VSHangHoa != null)
                {
                    this._VSHangHoa.DoubleClick += handler;
                }
            }
        }
    }
}

